#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int print_factorial(int n)
{
    if (n != 1)
        return n * print_factorial(n - 1);
    else
        return 1;
}
int main()
{
    int n = 0, x = 0;
    scanf("%d", &n);
    x = print_factorial(n);
    printf("%d\n", x);
    return 0;
}